<template>
	<div>
		<div class="select1">
			<div class="novel" v-for="(item,index) in datalist" :key="index">
				<router-link class="novel-content" to='booklist'>
					<img :src="item.url" alt="" width="51px" height="71" />
					<div class="subtime">
						<span class="title">{{item.title}}</span>
						<span class="num">{{item.term}}</span>
						<span class="num">{{item.time}}</span>
					</div>
				</router-link>
			</div>
		</div>
	</div>
</template>

<script>
import api from "../../../api/api.js";
export default {
  data() {
    return {
      datalist: []
    };
  },
  created() {
    this.datevalue = this.formatDate(new Date().getTime()); //时间
    this.getNavbar();
  },
  methods: {
    getNavbar() {
      const userid = localStorage.getItem("userid");
      this.$http({
        method: "post",
        url: api.baseURL + "getColumnNameByFColumnId",
        params: {
          inParam: {
            time: this.datevalue,
            sysCode: "FH_PUBOPE",
            columnId: 10,
            userId: userid,
            terminalType: 1,
            accid: 1
          }
        }
      })
        .then(response => {
          this.datalist = response.data.data;
          console.log(response.data.data);
        })
        .catch(error => {
          console.log(error);
        });
    }
  }
};
</script>

<style scoped>
.select1 {
  height: 100%;
  display: flex;
  justify-content: space-between;

  /*background: sandybrown;*/
  flex-wrap: wrap;
  margin: 12px 12px 0px 18px;
  box-sizing: border-box;
  padding-bottom: 50px;
}
.novel {
  margin-bottom: 20px;
  /*background: skyblue;*/
}

.novel .novel-content {
  display: flex;
  justify-content: center;
}

.novel .novel-content img {
  border-radius: 8px;
}

.novel .subtime {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-left: 10px;
  width: 64px;
}
.novel .subtime span {
  width: 64px;
  word-wrap: break-word;
  word-break: normal;
}
.novel .subtime .title {
  font-size: 15px;
  color: #252525;
  margin-bottom: 2px;
}
.novel .subtime .num {
  font-size: 12px;
  color: #a1a1a1;
}
</style>